package BiShi.huaweimianshi;

import java.util.BitSet;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        String s1 = "AVERDXIVYERDIAN";
        String s2 = "RDXI";
        System.out.println(helper(s1,s2));
    }

    private static int helper(String s1, String s2) {
        int i = 0;
        while(i < s1.length()){
            int j = 0;
            while(j < s2.length()){
                if(s1.charAt(i + j) == s2.charAt(j)){
                    j++;
                }else{
                    break;
                }
            }
            if(j == s2.length()){
                break;
            }else{
                i++;
            }
        }
        return i==s1.length() ? -1 : i+1;
        }


}
